﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DnaCoreLib
{
    public class MenuItem
    {
        public MenuItem(string app, string category, IMenuFunction function, string displayValue)
        {
            DisplayValue = displayValue;
        }
        public MenuItem(string app, string category, IMenuFunction function)
        {
            App = app;
            Category = category;
            Function = function;
        }
        public string App { get; set; }
        public string Category {get;set;}
        public string DisplayValue {get;set;}
        public string FunctionName
        {
            get
            {
                return Function.ToString();
            }
        }
        public IMenuFunction Function;

        public override string ToString()
        {
            if (String.IsNullOrEmpty(DisplayValue))
                return FunctionName;
            else
                return DisplayValue;
        }
    }
}
